<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>网站后台管理模版</title>
		<link rel="stylesheet" href="lib/layui-v2.5.5/css/layui.css" media="all">
		<link rel="stylesheet" href="css/public.css" media="all">
		<link rel="stylesheet" href="css/my/qadetail.css" >

	</head>
	<body>

	<div>
		<label class="layui-form-label">问题</label>
		<textarea id="question" name="question" readonly></textarea>
	</div>

	<div>
		<label class="layui-form-label">回答内容</label>
		<textarea name="content" id="content" class="layui-textarea" readonly></textarea>
	</div>


<script src="lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script src="api/baseApi.js" charset="utf-8"></script>
<script>
	layui.use(['layedit'], function(){
	var $ = layui.$;
	var layer = layui.layer;
	var layedit = layui.layedit;
	
		//获取页面传过来的数据
		let localData = layui.sessionData("asData");
		let as = localData.as;

		$.ajax({
			url: baseUrl + qsBaseUrl + as.questionId,
			type: 'get',
			dataType: "json",
			contentType: "application/json;charset=UTF-8",
			success:function(res){
				let question = res.data.question

				$('#question').html(question);
				$("#content").html(as.content);

				var index1 = layedit.build('question',{
					height:50
				}); //建立编辑器

				var index2 = layedit.build('content',{
					height:200
				}); //建立编辑器
			}
		})

	});
</script>
</body>
</html>